  <!-- vuebus-demo -->  
<template>
  <div class="titleCenter">
    {{number}}
    <el-button @click="handClick" size="small" type="warning">随机增加</el-button>
  </div>
</template>

<script>
export default {
  props: {
    number: {
      type: Number
    }
  },
  name: 'counter',
  data () {
    return {

    }
  },
  methods: {
    handClick () {
      //随机获取1-100中的数
      const num = Math.floor(Math.random() * 100 + 1)
      this.$bus.emit('add', num)
    }
  }
}
</script>

<style>
</style>
